// ex7_13_1.cpp
#include <iostream>

double h_average(int x, int y);
int main(void)
{
	using namespace std;
	int num1, num2;
	double average_val;
	cout << "Enter two integers:\n";
	cin >> num1 >> num2;
	while (num1 != 0 && num2 != 0)
	{
		average_val = h_average(num1, num2);
		cout << "The harmonic mean of " << num1 << " and "
			 << num2 << " is " << average_val << endl;
		cout << "Enter two integers: ";
		cin >> num1 >> num2;
	}
	cout << "Bye!\n";
}

double h_average(int x, int y)
{
	double val = 2.0 * x * y / (x + y);
	return val;
}
